#http://localhost:8080/read?date=whatever #esempio
#https://sb-ssl.google.com/safebrowsing/api/lookup?client=api&apikey=ABQIAAAAK329ckpEUTLtCqlUygsLSRRSJ3BIJ8UFj1DBFvJ3dWAybI5u0A&appver=1.0&pver=3.0&url=http%3A%2F%2Fianfette.org%2F



import urllib
import urllib2
import sys

#myPort = "8080" #esempio
#myParameters = { "client" : "api", "apikey" : "ABQIAAAAK329ckpEUTLtCqlUygsLSRRSJ3BIJ8UFj1DBFvJ3dWAybI5u0A", "appver" : "1.0", "pver" : "3.0", "url" : "http%3A%2F%2Fianfette.org%2F" }
myParameters = { "client" : "api", "apikey" : "ABQIAAAAK329ckpEUTLtCqlUygsLSRRSJ3BIJ8UFj1DBFvJ3dWAybI5u0A", "appver" : "1.0", "pver" : "3.0", "url" : "%s" % (sys.argv[1],) }

#myURL = "http://localhost:%s/read?%s" % (myPort, urllib.urlencode(myParameters)) #esempio
myURL = "https://sb-ssl.google.com/safebrowsing/api/lookup?%s" % (urllib.urlencode(myParameters),)

data = urllib2.urlopen(myURL).read()

print sys.argv[1], data

